<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSystemMediaCategoriesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('system_media_categories', function (Blueprint $table) {
            $table->increments('id')->comment('ID');
            $table->unsignedInteger('parent_id')->comment('父级ID');
            $table->string('name', 20)->comment('分类名称');
            $table->string('folder', 50)->nullable()->comment('目录名称');
            $table->dateTime('created_at')->nullable()->comment('创建时间');
            $table->dateTime('updated_at')->comment('更新时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('system_media_categories');
    }
}
